----------------------------------------------------------------------------------------
      name:  <unnamed>
       log:  /Users/paulmusgrave/Dropbox/0001 Academic Projects/Ongoing/0148 The Cyber/P
> osted/FPA Version/Work/Logs/Figure1Log.log
  log type:  text
 opened on:  25 Aug 2021, 10:11:38

. cd "$path/Data/"
/Users/paulmusgrave/Dropbox/0001 Academic Projects/Ongoing/0148 The Cyber/Posted/FPA Ver
> sion/Work/Data

. use "CCESUsable.dta"

. 
. set scheme plotplain

. 
. keep threatrussia threatchina threatkorea threatiran newsintadj internethome ///
>         age white college female gop7 dem7

. 
. *********************
. * Analysis
. *********************
. /*
> This section carries out basic OLS regressions as described in the text for 
> the four most relevant countries in the threat matrix (excluding Canada and non-
> state actors).
> */
. 
. 
. * Russia
. reg threatrussia i.newsintadj##gop7 i.newsintadj##dem7 i.internethome ///
>         age white college female

      Source |       SS           df       MS      Number of obs   =       737
-------------+----------------------------------   F(17, 719)      =     12.95
       Model |  61290.0195        17  3605.29527   Prob > F        =    0.0000
    Residual |  200106.348       719  278.312027   R-squared       =    0.2345
-------------+----------------------------------   Adj R-squared   =    0.2164
       Total |  261396.367       736  355.158107   Root MSE        =    16.683

--------------------------------------------------------------------------------------
        threatrussia |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
---------------------+----------------------------------------------------------------
          newsintadj |
  Only now and then  |   16.91998   6.611039     2.56   0.011     3.940733    29.89923
   Some of the time  |   20.66325   5.996374     3.45   0.001     8.890759    32.43575
   Most of the time  |   23.22997   5.951461     3.90   0.000     11.54565    34.91429
                     |
              1.gop7 |   20.23372   6.411661     3.16   0.002     7.645906    32.82154
                     |
     newsintadj#gop7 |
Only now and then#1  |  -23.65846   8.090192    -2.92   0.004    -39.54168   -7.775234
 Some of the time#1  |  -27.90888   7.297753    -3.82   0.000    -42.23633   -13.58143
 Most of the time#1  |   -29.8427    7.02313    -4.25   0.000    -43.63099   -16.05441
                     |
              1.dem7 |   18.36052   6.830687     2.69   0.007      4.95004    31.77099
                     |
     newsintadj#dem7 |
Only now and then#1  |  -9.614202   8.235407    -1.17   0.243    -25.78252    6.554116
 Some of the time#1  |  -12.51342   7.566954    -1.65   0.099    -27.36938     2.34255
 Most of the time#1  |  -6.863761   7.387233    -0.93   0.353    -21.36689    7.639364
                     |
        internethome |
            Dial-up  |  -14.86099   5.676735    -2.62   0.009    -26.00595   -3.716036
               None  |  -.9868539   2.983449    -0.33   0.741    -6.844166    4.870458
                     |
                 age |   .0049818   .0405351     0.12   0.902    -.0745995    .0845631
               white |  -.7465095   1.560245    -0.48   0.632     -3.80969    2.316671
             college |    1.11879   1.323177     0.85   0.398    -1.478961    3.716542
              female |  -1.547742   1.290835    -1.20   0.231    -4.081999    .9865147
               _cons |  -15.05224   5.606643    -2.68   0.007    -26.05959   -4.044891
--------------------------------------------------------------------------------------

. eststo russia

. reg threatchina i.newsintadj##gop7 i.newsintadj##dem7 i.internethome ///
>         age white college female

      Source |       SS           df       MS      Number of obs   =       737
-------------+----------------------------------   F(17, 719)      =      9.14
       Model |  52059.9765        17  3062.35156   Prob > F        =    0.0000
    Residual |  240840.815       719  334.966362   R-squared       =    0.1777
-------------+----------------------------------   Adj R-squared   =    0.1583
       Total |  292900.791       736  397.963031   Root MSE        =    18.302

--------------------------------------------------------------------------------------
         threatchina |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
---------------------+----------------------------------------------------------------
          newsintadj |
  Only now and then  |    10.2492   7.252777     1.41   0.158    -3.989951    24.48835
   Some of the time  |   11.12823   6.578446     1.69   0.091    -1.787029    24.04349
   Most of the time  |   20.59698   6.529173     3.15   0.002     7.778457     33.4155
                     |
              1.gop7 |   .3325313   7.034046     0.05   0.962    -13.47719    14.14225
                     |
     newsintadj#gop7 |
Only now and then#1  |  -5.726098   8.875512    -0.65   0.519    -23.15112    11.69892
 Some of the time#1  |  -.1442704    8.00615    -0.02   0.986     -15.8625    15.57396
 Most of the time#1  |  -1.362694    7.70487    -0.18   0.860    -16.48943    13.76404
                     |
              1.dem7 |   .4588768   7.493747     0.06   0.951    -14.25336    15.17112
                     |
     newsintadj#dem7 |
Only now and then#1  |  -4.566762   9.034823    -0.51   0.613    -22.30455    13.17103
 Some of the time#1  |  -3.417861   8.301483    -0.41   0.681    -19.71591    12.88018
 Most of the time#1  |  -9.159637   8.104317    -1.13   0.259    -25.07059    6.751317
                     |
        internethome |
            Dial-up  |  -7.826726   6.227779    -1.26   0.209    -20.05353    4.400079
               None  |  -1.375628   3.273054    -0.42   0.674    -7.801513    5.050257
                     |
                 age |   .1639822   .0444699     3.69   0.000     .0766759    .2512885
               white |   .7552109   1.711699     0.44   0.659    -2.605315    4.115737
             college |   1.929237   1.451618     1.33   0.184    -.9206799    4.779154
              female |  -4.441685   1.416138    -3.14   0.002    -7.221944   -1.661426
               _cons |  -18.62233   6.150884    -3.03   0.003    -30.69817   -6.546491
--------------------------------------------------------------------------------------

. eststo china

. reg threatkorea i.newsintadj##gop7 i.newsintadj##dem7 i.internethome ///
>         age white college female

      Source |       SS           df       MS      Number of obs   =       737
-------------+----------------------------------   F(17, 719)      =      3.35
       Model |  14713.3108        17  865.488869   Prob > F        =    0.0000
    Residual |  185900.364       719  258.554053   R-squared       =    0.0733
-------------+----------------------------------   Adj R-squared   =    0.0514
       Total |  200613.675       736  272.572927   Root MSE        =     16.08

--------------------------------------------------------------------------------------
         threatkorea |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
---------------------+----------------------------------------------------------------
          newsintadj |
  Only now and then  |  -7.264432   6.372053    -1.14   0.255    -19.77449    5.245622
   Some of the time  |  -5.275709   5.779608    -0.91   0.362    -16.62263    6.071216
   Most of the time  |  -9.556188   5.736319    -1.67   0.096    -20.81812    1.705748
                     |
              1.gop7 |    1.03261   6.179883     0.17   0.867    -11.10016    13.16538
                     |
     newsintadj#gop7 |
Only now and then#1  |   2.861337   7.797736     0.37   0.714    -12.44771    18.17039
 Some of the time#1  |  -.4836877   7.033943    -0.07   0.945    -14.29321    13.32583
 Most of the time#1  |  -3.100273   6.769248    -0.46   0.647    -16.39013    10.18958
                     |
              1.dem7 |   4.425145   6.583761     0.67   0.502    -8.500549    17.35084
                     |
     newsintadj#dem7 |
Only now and then#1  |   1.638055   7.937701     0.21   0.837    -13.94579     17.2219
 Some of the time#1  |  -2.311008   7.293413    -0.32   0.751    -16.62994    12.00792
 Most of the time#1  |   1.776291   7.120189     0.25   0.803    -12.20255    15.75514
                     |
        internethome |
            Dial-up  |   5.226792   5.471524     0.96   0.340     -5.51528    15.96886
               None  |  -3.527997   2.875599    -1.23   0.220     -9.17357    2.117576
                     |
                 age |   -.015057   .0390698    -0.39   0.700    -.0917615    .0616475
               white |    2.50295   1.503843     1.66   0.096    -.4494981    5.455399
             college |   -1.49334   1.275344    -1.17   0.242    -3.997184    1.010504
              female |   1.654588   1.244172     1.33   0.184    -.7880572    4.097232
               _cons |   4.505409   5.403966     0.83   0.405    -6.104029    15.11485
--------------------------------------------------------------------------------------

. eststo korea

. reg threatiran i.newsintadj##gop7 i.newsintadj##dem7 i.internethome ///
>         age white college female

      Source |       SS           df       MS      Number of obs   =       737
-------------+----------------------------------   F(17, 719)      =      4.90
       Model |  21339.3682        17  1255.25695   Prob > F        =    0.0000
    Residual |  184139.801       719  256.105426   R-squared       =    0.1039
-------------+----------------------------------   Adj R-squared   =    0.0827
       Total |   205479.17       736  279.183654   Root MSE        =    16.003

--------------------------------------------------------------------------------------
          threatiran |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
---------------------+----------------------------------------------------------------
          newsintadj |
  Only now and then  |  -7.306292   6.341808    -1.15   0.250    -19.75697    5.144383
   Some of the time  |  -4.203863   5.752176    -0.73   0.465    -15.49693    7.089204
   Most of the time  |  -4.205177   5.709091    -0.74   0.462    -15.41366    7.003305
                     |
              1.gop7 |  -5.375342    6.15055    -0.87   0.382    -17.45053    6.699842
                     |
     newsintadj#gop7 |
Only now and then#1  |   12.73361   7.760724     1.64   0.101     -2.50278    27.96999
 Some of the time#1  |    5.33763   7.000556     0.76   0.446    -8.406344     19.0816
 Most of the time#1  |   10.40105   6.737118     1.54   0.123    -2.825721    23.62783
                     |
              1.dem7 |  -8.690738   6.552512    -1.33   0.185    -21.55508    4.173604
                     |
     newsintadj#dem7 |
Only now and then#1  |   8.657695   7.900025     1.10   0.273    -6.852178    24.16757
 Some of the time#1  |   4.466144   7.258794     0.62   0.539    -9.784821    18.71711
 Most of the time#1  |   1.151997   7.086393     0.16   0.871     -12.7605    15.06449
                     |
        internethome |
            Dial-up  |   4.006021   5.445553     0.74   0.462    -6.685063    14.69711
               None  |  -.9171718    2.86195    -0.32   0.749    -6.535948    4.701605
                     |
                 age |    .089184   .0388843     2.29   0.022     .0128436    .1655244
               white |  -1.293642   1.496705    -0.86   0.388    -4.232076    1.644793
             college |  -2.436658   1.269291    -1.92   0.055    -4.928617    .0553018
              female |   1.897425   1.238267     1.53   0.126    -.5336262    4.328475
               _cons |  -1.620149   5.378316    -0.30   0.763    -12.17923    8.938931
--------------------------------------------------------------------------------------

. eststo iran

. 
. 
. *********************
. * Graphing
. *********************
. /*
> This section produces a chart showing the coefficients that are most relevant
> to demonstrating superficial polarization in the responses, one chart per country,
> and then combines them.
> */
. 
. 
. coefplot china, xline(0) drop(_cons female college age white *.internethome) ///
>         name(chinachart) title("China") ///
>         nolabels nobaselevels xline(0) ///
>         headings(1.newsintadj="{bf:News Interest}" ///
>                          1.gop7="{bf:Republican}" ///
>                          1.dem7="{bf:Democrat}", labsize(vsmall))  ///
>         coeflabels(1.newsintadj = "Only now and then" ///
>                                 2.newsintadj = "Some of the time" ///
>                                 3.newsintadj = "Most of the time" ///
>                                 1.gop7 = "Republican" ///
>                                 1.newsintadj#1.gop7 = "Republican x Only now and then"
>  ///
>                                 2.newsintadj#1.gop7 = "Republican x Some of the time" 
> ///
>                                 3.newsintadj#1.gop7 = "Republican x Most of the time" 
> ///
>                                 1.dem7 = "Democrat" ///
>                                 1.newsintadj#1.dem7 = "Democrat x Only now and then" /
> //
>                                 2.newsintadj#1.dem7 = "Democrat x Some of the time" //
> /
>                                 3.newsintadj#1.dem7 = "Democrat x Most of the time") /
> //
>         ylabel(,labsize(tiny))

.                                 
. 
. coefplot russia, xline(0) drop(_cons female college age white *.internethome) ///
>         name(russiachart) title("Russia") ///
>         nolabels nobaselevels xline(0) ///
>         headings(1.newsintadj="{bf:News Interest}" ///
>                          1.gop7="{bf:Republican}" ///
>                          1.dem7="{bf:Democrat}", labsize(vsmall))  ///
>         coeflabels(1.newsintadj = "Only now and then" ///
>                                 2.newsintadj = "Some of the time" ///
>                                 3.newsintadj = "Most of the time" ///
>                                 1.gop7 = "Republican" ///
>                                 1.newsintadj#1.gop7 = "Republican x Only now and then"
>  ///
>                                 2.newsintadj#1.gop7 = "Republican x Some of the time" 
> ///
>                                 3.newsintadj#1.gop7 = "Republican x Most of the time" 
> ///
>                                 1.dem7 = "Democrat" ///
>                                 1.newsintadj#1.dem7 = "Democrat x Only now and then" /
> //
>                                 2.newsintadj#1.dem7 = "Democrat x Some of the time" //
> /
>                                 3.newsintadj#1.dem7 = "Democrat x Most of the time") /
> //
>         ylabel(,labsize(tiny))

.                                 
. 
. coefplot iran, xline(0) drop(_cons female college age white *.internethome) ///
>         name(iranchart) title("Iran") ///
>         nolabels nobaselevels xline(0) ///
>         headings(1.newsintadj="{bf:News Interest}" ///
>                          1.gop7="{bf:Republican}" ///
>                          1.dem7="{bf:Democrat}", labsize(vsmall))  ///
>         coeflabels(1.newsintadj = "Only now and then" ///
>                                 2.newsintadj = "Some of the time" ///
>                                 3.newsintadj = "Most of the time" ///
>                                 1.gop7 = "Republican" ///
>                                 1.newsintadj#1.gop7 = "Republican x Only now and then"
>  ///
>                                 2.newsintadj#1.gop7 = "Republican x Some of the time" 
> ///
>                                 3.newsintadj#1.gop7 = "Republican x Most of the time" 
> ///
>                                 1.dem7 = "Democrat" ///
>                                 1.newsintadj#1.dem7 = "Democrat x Only now and then" /
> //
>                                 2.newsintadj#1.dem7 = "Democrat x Some of the time" //
> /
>                                 3.newsintadj#1.dem7 = "Democrat x Most of the time") /
> //
>         ylabel(,labsize(tiny))

. 
. coefplot korea, xline(0) drop(_cons female college age white *.internethome) ///
>         name(koreachart) title("Korea") ///
>         nolabels nobaselevels xline(0) ///
>         headings(1.newsintadj="{bf:News Interest}" ///
>                          1.gop7="{bf:Republican}" ///
>                          1.dem7="{bf:Democrat}", labsize(vsmall))  ///
>         coeflabels(1.newsintadj = "Only now and then" ///
>                                 2.newsintadj = "Some of the time" ///
>                                 3.newsintadj = "Most of the time" ///
>                                 1.gop7 = "Republican" ///
>                                 1.newsintadj#1.gop7 = "Republican x Only now and then"
>  ///
>                                 2.newsintadj#1.gop7 = "Republican x Some of the time" 
> ///
>                                 3.newsintadj#1.gop7 = "Republican x Most of the time" 
> ///
>                                 1.dem7 = "Democrat" ///
>                                 1.newsintadj#1.dem7 = "Democrat x Only now and then" /
> //
>                                 2.newsintadj#1.dem7 = "Democrat x Some of the time" //
> /
>                                 3.newsintadj#1.dem7 = "Democrat x Most of the time") /
> //
>         ylabel(,labsize(tiny))

.         
. cd "$path/Charts/"
/Users/paulmusgrave/Dropbox/0001 Academic Projects/Ongoing/0148 The Cyber/Posted/FPA Ver
> sion/Work/Charts

. 
. graph combine russiachart koreachart chinachart iranchart, ycommon xcommon ///
>         title("Figure 1: Partisanship and Cyber Threat Perception") ///
>         subtitle("Selected OLS Coefficients Displayed", size(small)) ///
>         rows(2) xsize(9) ysize(10) ///
>         note("Full specification includes demographic controls.",size(vsmall)) ///
> 

. 
. graph export "Figure 1.pdf", replace
(file /Users/paulmusgrave/Dropbox/0001 Academic Projects/Ongoing/0148 The Cyber/Posted/F
> PA Version/Work/Charts/Figure 1.pdf written in PDF format)

. 
. *********************
. * Tables
. *********************
. /*
> This section produces a table with full results from the stored regression results.
> */
. 
. cd "$path/Tables/"
/Users/paulmusgrave/Dropbox/0001 Academic Projects/Ongoing/0148 The Cyber/Posted/FPA Ver
> sion/Work/Tables

. 
. cd "~/Dropbox/0001 Academic Projects/Ongoing/0148 The Cyber/Posted/FPA Version/Work/Ta
> bles"
/Users/paulmusgrave/Dropbox/0001 Academic Projects/Ongoing/0148 The Cyber/Posted/FPA Ver
> sion/Work/Tables

. esttab russia china iran korea ///
>         using TableOLSModels.tex, ///
>         label replace nobaselevels ///
>         mtitles("Russia" "China" "Iran" "Korea") ///
>         title("Partisanship and Cyber Threat Perception") ///
>         wrap compress longtable
(output written to TableOLSModels.tex)

. 
. log close
      name:  <unnamed>
       log:  /Users/paulmusgrave/Dropbox/0001 Academic Projects/Ongoing/0148 The Cyber/P
> osted/FPA Version/Work/Logs/Figure1Log.log
  log type:  text
 closed on:  25 Aug 2021, 10:11:47
----------------------------------------------------------------------------------------
